<?php /* Smarty version Smarty-3.1.14, created on 2017-08-19 09:43:39
         compiled from "E:\phpStudy\WWW\zyshop\admin\templates\user_sh_list.html" */ ?>
<?php /*%%SmartyHeaderCode:1857459950122602a77-81634546%%*/if(!defined('SMARTY_DIR')) exit('no direct access allowed');
$_valid = $_smarty_tpl->decodeProperties(array (
  'file_dependency' => 
  array (
    '07fa6ef20bd39b7f132a85977ad4a6001d58da9e' => 
    array (
      0 => 'E:\\phpStudy\\WWW\\zyshop\\admin\\templates\\user_sh_list.html',
      1 => 1503106894,
      2 => 'file',
    ),
  ),
  'nocache_hash' => '1857459950122602a77-81634546',
  'function' => 
  array (
  ),
  'version' => 'Smarty-3.1.14',
  'unifunc' => 'content_59950122645d07_24911051',
  'variables' => 
  array (
    'URL' => 0,
    'quyu_list' => 0,
    'quyus' => 0,
    'sou' => 0,
    'shop' => 0,
    'list' => 0,
    'page' => 0,
  ),
  'has_nocache_code' => false,
),false); /*/%%SmartyHeaderCode%%*/?>
<?php if ($_valid && !is_callable('content_59950122645d07_24911051')) {function content_59950122645d07_24911051($_smarty_tpl) {?><?php echo $_smarty_tpl->getSubTemplate ("header.html", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, null, null, array(), 0);?>

<script type="text/javascript" src="<?php echo $_smarty_tpl->tpl_vars['URL']->value;?>
resource/laydate/laydate.js"></script>
<style>
table{text-align: center;}
th{text-align:center; font-weight: bolder;}
th a{ color:#000000;}
.firtd {	width: 100px;	padding-right: 10px;	text-align: right;}
input{width: 90px;}
textarea {	width: 350px;	height: 100px;}
#jin{
color:#f00;
}
#jin1{
color:#0D93BF;
}
</style>
<body>
<div class="fixed-bar">
  <div class="item-title">
    <h3>商户列表</h3>
    <form action="user_sh.php" name="searchForm" method="get">
        <input type="hidden" name="act" value="list">
        <!-- 品牌 -->
        <select name="r_id">
          <option value="0">所有区域</option>
          <?php  $_smarty_tpl->tpl_vars['quyus'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['quyus']->_loop = false;
 $_from = $_smarty_tpl->tpl_vars['quyu_list']->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
foreach ($_from as $_smarty_tpl->tpl_vars['quyus']->key => $_smarty_tpl->tpl_vars['quyus']->value){
$_smarty_tpl->tpl_vars['quyus']->_loop = true;
?>
               <option value="<?php echo $_smarty_tpl->tpl_vars['quyus']->value['r_id'];?>
" <?php if ($_smarty_tpl->tpl_vars['quyus']->value['r_id']==$_smarty_tpl->tpl_vars['sou']->value['r_id']){?> selected="selected" <?php }?>><?php echo $_smarty_tpl->tpl_vars['quyus']->value['r_name'];?>
</option>
          <?php } ?>
        </select>
        <!--关键字-->
        <input type="text"  style="width:180px; height:18px;margin-left:5px; vertical-align: middle;" name="keywords" value="<?php if ($_smarty_tpl->tpl_vars['sou']->value['keywords']){?><?php echo $_smarty_tpl->tpl_vars['sou']->value['keywords'];?>
<?php }?>" placeholder="关键字">
        <input value=" 搜索 " id="but_sousuo" style="width:50px; height:27px; margin-top:13px;" class="button" type="submit">
        <div style="background:rgba(251,112,45,1);width:125px;height:40px;float:right;text-align:center;border-radius:5px;">
          <a href="user_sh.php?act=edit">
            <h5 style="padding:10px;color:#fff;">添加商户</h5>
          </a>
        </div>
    </form>
  </div> 
</div>
<div class="fixed_bottom">
  <form method="post" action="" id="aspnetForm" name="form1">
    <table align="center;" class="table tb-type2">
      <thead>
        <tr>
          <th><a>编号</a></th>
          <th><a>商户名称</a></th>
          <th><a>所属小区</a></th>
          <th><a>邮件</a></th>
          <th><a>电话</a></th>
          <th><a>店铺营业时间</a></th>
          <th><a>商铺地址</a></th>
          <th><a>店铺起送价</a></th>
          <th><a>添加店铺时间</a></th>
          <th><a>是否默认</a></th>
          <th><a>店铺图片</a></th>
          <th><a>操作</a></th>
        </tr>
      </thead>
      <tbody id="sortable">
        <?php  $_smarty_tpl->tpl_vars['list'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['list']->_loop = false;
 $_smarty_tpl->tpl_vars['k'] = new Smarty_Variable;
 $_from = $_smarty_tpl->tpl_vars['shop']->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
foreach ($_from as $_smarty_tpl->tpl_vars['list']->key => $_smarty_tpl->tpl_vars['list']->value){
$_smarty_tpl->tpl_vars['list']->_loop = true;
 $_smarty_tpl->tpl_vars['k']->value = $_smarty_tpl->tpl_vars['list']->key;
?>
            <tr>
              <td><?php echo $_smarty_tpl->tpl_vars['list']->value['s_id'];?>
</td>
              <td><?php echo $_smarty_tpl->tpl_vars['list']->value['shop_name'];?>
</td>
              <td><?php echo $_smarty_tpl->tpl_vars['list']->value['r_name'];?>
</td>
              <td><?php echo $_smarty_tpl->tpl_vars['list']->value['shop_email'];?>
</td>
              <td><?php echo $_smarty_tpl->tpl_vars['list']->value['shop_tel'];?>
</td>
              <td><?php echo $_smarty_tpl->tpl_vars['list']->value['start_time'];?>
</td>
              <td><?php echo $_smarty_tpl->tpl_vars['list']->value['shop_address'];?>
</td>
              <td><?php echo $_smarty_tpl->tpl_vars['list']->value['start_price'];?>
</td>  
              <td><?php echo $_smarty_tpl->tpl_vars['list']->value['shop_datetime'];?>
</td>
              <td><?php if ($_smarty_tpl->tpl_vars['list']->value['shop_tj']==1){?>是<?php }else{ ?>否<?php }?></td>
              <td><img class="toux_img" src="../<?php if ($_smarty_tpl->tpl_vars['list']->value['shop_img']){?><?php echo $_smarty_tpl->tpl_vars['list']->value['shop_img'];?>
<?php }else{ ?>images/mrimgs.jpg<?php }?>" width="50" height="50" /></td>
              <td>
                <?php if ($_smarty_tpl->tpl_vars['list']->value['shop_zt']==1){?>
                  <a href="javascript:;" id="jin" onclick="jy(this,<?php echo $_smarty_tpl->tpl_vars['list']->value['s_id'];?>
)">禁用</a>
                <?php }else{ ?>
                  <a href="javascript:;" id="jin1" onclick="jy(this,<?php echo $_smarty_tpl->tpl_vars['list']->value['s_id'];?>
)">开启</a>
                <?php }?>

                <a href="user_sh.php?act=edit&s_id=<?php echo $_smarty_tpl->tpl_vars['list']->value['s_id'];?>
">编辑</a>
                <a href="user_sh.php?act=del&s_id=<?php echo $_smarty_tpl->tpl_vars['list']->value['s_id'];?>
">删除</a>
              </td>
            </tr>
        <?php } ?>
      </tbody>
    </table>
   <div class="page"><?php echo $_smarty_tpl->tpl_vars['page']->value;?>
</div>
  </form>
</div>
</body>
<script>
//选择时间
laydate({
  elem: '#start_time', //目标元素。由于laydate.js封装了一个轻量级的选择器引擎，因此elem还允许你传入class、tag但必须按照这种方式 '#id .class'
  event: 'focus', //响应事件。如果没有传入event，则按照默认的click
  format: 'YYYY-MM-DD hh:mm:ss', //日期格式
  istime: true, //是否开启时间选择
  isclear: true, //是否显示清空
  istoday: true, //是否显示今天
  issure: true, //是否显示确认
  festival: true, //是否显示节日
  min: '1900-01-01 00:00:00', //最小日期
  max: '2099-12-31 23:59:59', //最大日期
  fixed: true, //是否固定在可视区域
});
laydate({
  elem: '#end_time', //目标元素。由于laydate.js封装了一个轻量级的选择器引擎，因此elem还允许你传入class、tag但必须按照这种方式 '#id .class'
  event: 'focus', //响应事件。如果没有传入event，则按照默认的click
  format: 'YYYY-MM-DD hh:mm:ss', //日期格式
  istime: true, //是否开启时间选择
  isclear: true, //是否显示清空
  istoday: true, //是否显示今天
  issure: true, //是否显示确认
  festival: true, //是否显示节日
  min: '1900-01-01 00:00:00', //最小日期
  max: '2099-12-31 23:59:59', //最大日期
  fixed: true, //是否固定在可视区域
});
function jy(obj,s_id){
	if($(obj).html()=='禁用'){
		var vals=1;
	}else{
		var vals=2;
	}
	$.post("user_sh.php",{act:'disable',id:s_id,val:vals},function(data){
		if(data==1){
			layer.msg("操作成功！");
			if(vals==1){$(obj).html("开启");$(obj).css("color","#0D93BF");}else{$(obj).html("禁用");$(obj).css("color","#f00")}
		}else if(data==2){
			layer.msg("操作失败！");
		}
	})
}
</script>
</html><?php }} ?>